package com.example.figurehecheng.controller.merchant;


import com.example.figurehecheng.common.context.BaseContext;
import com.example.figurehecheng.common.result.Result;
import com.example.figurehecheng.common.utils.AliOssUtil;
import com.example.figurehecheng.domain.dto.CanteenDTO;
import com.example.figurehecheng.domain.dto.TourtableDTO;
import com.example.figurehecheng.domain.entity.Image;
import com.example.figurehecheng.domain.vo.CanteenVO;
import com.example.figurehecheng.domain.vo.TourtableVO;
import com.example.figurehecheng.service.ICanteenService;
import com.example.figurehecheng.service.impl.ImageServiceImpl;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author 宇科工作室
 * @since 2024-10-18
 */

@RestController("merchantCanteenController")
@RequestMapping("/merchant/canteen")
@CrossOrigin
@Slf4j
@RequiredArgsConstructor
public class CanteenController {
    @Autowired
    private ICanteenService iCanteenService;
    private  final ImageServiceImpl imageService;
    private final AliOssUtil aliOssUtil;

    /**
     * 修改+添加
     * @param canteenDTO
     */
    @PostMapping("/unpdate")
    @ApiOperation("修改")
    public void updateCoupon(@RequestBody CanteenDTO canteenDTO) {

        iCanteenService.updatetour(canteenDTO);

    }


    /**
     * 查询
     */
    @GetMapping("/selectcanteen")
    @ApiOperation(value = "查询项目")
    public Result<CanteenVO> querySearch(){
        CanteenVO selectone = iCanteenService.selectone();

        return Result.success(selectone);
    }



}
